.wrapper {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: stretch;
}

.panel {
  position: relative;
  width: 300px;
  background: #181c20;
  padding-top: 30px;
  z-index: 1000;
}

.canvas {
  flex: 1;
  display: flex;
  outline: none;
  background: #f9f9f9;
}

.box {
  position: absolute;
  height: 100px;
  width: 100px;
  outline: none;
  touch-action: none;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-select: none;
}

.box.selected {
  z-index: 100;
}

.handle {
  touch-action: none;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 0;
  z-index: 10;
}

.box.selected .handle {
  opacity: 1;
}

.handle.position {
  width: 100%;
  height: 100%;
  z-index: 1;
  box-shadow: 0 0 0 1px #18a0fb;
  border: 1px solid #18a0fb;
}

.handle.left {
  left: -5px;
}

.handle.right {
  right: -5px;
}

.handle.top {
  top: -5px;
}

.handle.bottom {
  bottom: -5px;
}

.handle.left,
.handle.right {
  top: 5px;
  width: 10px;
  height: calc(100% - 10px);
  cursor: ew-resize;
}

.handle.top,
.handle.bottom {
  left: 5px;
  width: calc(100% - 10px);
  height: 10px;
  cursor: ns-resize;
}

.handle.corner {
  height: 10px;
  width: 10px;
  background: #fff;
  border: 1px solid #18a0fb;
}

.handle.corner.top-left {
  top: -5px;
  left: -5px;
  cursor: nwse-resize;
}

.handle.corner.bottom-left {
  bottom: -5px;
  left: -5px;
  cursor: nesw-resize;
}

.handle.corner.top-right {
  top: -5px;
  right: -5px;
  cursor: nesw-resize;
}

.handle.corner.bottom-right {
  bottom: -5px;
  right: -5px;
  cursor: nwse-resize;
}
